package com.kgc.scd.service;

import com.kgc.scd.bean.User;

/**
 * @program: com.kgc.scd.service
 * @author: HarryXzy
 * @create: 2022-06-09 23:04
 * @description:
 **/
public interface LoginRegiservice {

    /**
    * @author: HarryXzy
    * @date: 2022/6/9 23:25
    * @return: boolean
    * @description: 判断用户有没有用微信登陆过
    */
    User haveAcct(String openid);

    /**
     * @author: HarryXzy
     * @date: 2022/6/9 23:43
     * @return: java.lang.String
     * @description: 微信登陆成功获取令牌
     */
    String getTokenByWX(User user);

    /**
    * @author: HarryXzy
    * @date: 2022/6/10 10:26
    * @return: boolean
    * @description: 判断绑定过的手机号不能再次绑定
    */
    User havePhone(String phoneNO);

    /**
     * @author: HarryXzy
     * @date: 2022/6/10 10:33
     * @return: boolean
     * @description: 判断该微信id是否已经绑定过手机
     */
    boolean selectWxid(String wxId);

    /***
    * @author: HarryXzy
    * @date: 2022/6/10 11:06
    * @return: com.kgc.scd.bean.User
    * @description: 保存用户
    */
    Boolean saveUser(User user);

    /**
    * @author: HarryXzy
    * @date: 2022/6/10 11:40
    * @return: com.kgc.scd.bean.User
    * @description: 根据手机号注册或登陆
    */
    User getUserByPhone(String phoneNo);

    /***
    * @author: HarryXzy
    * @date: 2022/6/10 12:23
    * @return: com.kgc.scd.bean.User
    * @description: 根据用户名或电话查询密码
    */
    User loginByUsernameOrPhone(String userNameOrPhone, String userPwd);

    /**
    * @author: HarryXzy
    * @date: 2022/6/10 13:41
    * @return: boolean
    * @description: 查看用户名是否重复
    */
    boolean haveUserName(String userName);
}
